package edu.stonybrook.cs.gars.client;

import gwtupload.client.IUploader;
import gwtupload.client.MultiUploader;

import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.FileUpload;
import com.google.gwt.user.client.ui.FlexTable;
import com.google.gwt.user.client.ui.FormPanel;
import com.google.gwt.user.client.ui.FormPanel.SubmitCompleteEvent;
import com.google.gwt.user.client.ui.FormPanel.SubmitCompleteHandler;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HTMLPanel;
import com.google.gwt.user.client.ui.HasAlignment;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.user.client.ui.FormPanel.SubmitEvent;
import com.google.gwt.user.client.ui.FormPanel.SubmitHandler;


public class ApplicationTablePanel extends Composite {
	GARS gars;
	
	
	@UiField HTMLPanel applicationTableContainer;
	
	private FlexTable applicationTable;

	private static ApplicationTablePanelUiBinder uiBinder = GWT
			.create(ApplicationTablePanelUiBinder.class);

	interface ApplicationTablePanelUiBinder extends
			UiBinder<Widget, ApplicationTablePanel> {
	}
	
	MultiUploader defaultUploader;

	public ApplicationTablePanel(GARS gars) 
	{
		defaultUploader = new MultiUploader();

		
		initWidget(uiBinder.createAndBindUi(this));
		
		
		applicationTable = ApplicationTable.getApplicationTableInstance();
		
		HorizontalPanel horizontalPanel = new HorizontalPanel();
		horizontalPanel.add(defaultUploader);
		
		applicationTableContainer.add(horizontalPanel);
		applicationTableContainer.add(applicationTable);

		
		this.gars = gars;

	}

}
